package com.tourism.admin.enums;

/**
 * @author linli
 * at 18-3-31 下午3:12
 * 返回枚举对象
 */
public enum ResultEnum {

    //密码错误
    PASSWORD_ERROR(1000, "密码错误!"),

    EMAIL_FORBIDDEN_ERROR(1001, "你因违反论坛协议而被被多个用户举报，邮箱被永久禁用!"),

    //邮箱不存在
    EMAIL_ERROR(1002, "邮箱不存在!"),



    //邮箱已经注册
    EMAIL_EXIST_ERROR(1003, "非法注册,该邮箱已经被注册，请重新操作!"),

    //未登录
    NO_LOGGED_H(1004, "<link rel=\"stylesheet\" href=\"http://123.207.19.115:8888/layui/css/layui.css\"><script src=\"http://123.207.19.115:8888/layui/layui.js\"></script><script>layui.use('layer',function () {layer.msg('请登录!');setTimeout(\"history.go(-1)\",2000);})</script>"),
    NO_LOGGED_A(1004, "<script>location.href="+"'/admin/noLoginA'"+"</script>"),

    //无权限
    NO_AUTH(1005, "<script>location.href="+"'/admin/forbidden'"+"</script>"),

    //验证码不存在
    NO_CODE_ERROR(1006, "请获取验证码!"),

    //未知错误
    UN_KNOWN_ERROR(-1000,"未知错误!");


    private Integer code;
    private String message;

    ResultEnum(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }
}
